<template>
  <div class="wiper">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper-image" :src="item.url" alt="">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
      <!--<div class="swiper-scrollbar"   slot="scrollbar"></div>-->
    </swiper>
  </div>

</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: [
        {
          id: '0001',
          url: 'https://imgs.qunarzz.com/p/tts6/1803/53/6f3276907a789902.jpg_r_390x260x90_6f5b802c.jpg'
        },
        {
          id: '0002',
          url: 'https://imgs.qunarzz.com/p/tts8/1803/c9/05dc7a1bd56eaf02.jpg_r_390x260x90_acbacabc.jpg'
        }
      ]
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wiper >>> .swiper-pagination-bullet-active
    background #ffffff
  .wiper
    width 100%
    height 0
    overflow hidden
    padding-bottom 66.66%
    .swiper-image
      width 100%
</style>
